Matthias Clasen [Fri, 15 May 2020 01:27:45 +0000 (21:27 -0400)]
gtk: Handle seatless displays
If you run weston with the headless backend, you get a Wayland
display with no seat, which is just fine by the protocol.
gdk_display_get_default_seat() returns NULL in this case. Various
widgets assume that we always have a seat with a keyboard and a
pointer, since that is what X guarantees. Make things survive
without that, so we can run the testsuite under a headless
Wayland compositor.
Matthias Clasen [Fri, 15 May 2020 03:14:04 +0000 (23:14 -0400)]
docs: Clarify gdk_display_get_default_seat() docs
This function can return %NULL if the display
does not have a seat. Document that.
Timm Bäder [Fri, 15 May 2020 11:19:05 +0000 (11:19 +0000)]
Merge branch 'wip/tintou/set_css_classes_array' into 'master'
widget: Add array annotation to set_css_classes
See merge request GNOME/gtk!1907
Corentin Noël [Fri, 15 May 2020 10:00:50 +0000 (12:00 +0200)]
widget: Add array annotation to set_css_classes
It expects a NULL-terminated array so annotate it.
Jakub Steiner [Fri, 15 May 2020 08:17:58 +0000 (08:17 +0000)]
Merge branch 'wip/jimmac/tabs-again-focus' into 'master'
Adwaita: notebook tab focus tweak
Closes #2721
See merge request GNOME/gtk!1906
Jakub Steiner [Fri, 15 May 2020 07:32:41 +0000 (09:32 +0200)]
Adwaita: notebook tab focus tweak
Finally fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2721
Matthias Clasen [Fri, 15 May 2020 01:38:38 +0000 (01:38 +0000)]
Merge branch 'tests-cleanup' into 'master'
Tests cleanup
See merge request GNOME/gtk!1904
Matthias Clasen [Fri, 15 May 2020 00:32:53 +0000 (20:32 -0400)]
tests: Drop testdnd3
This has been integrated in gtk4-demo as the
DND example.
See #2738
Matthias Clasen [Fri, 15 May 2020 00:15:59 +0000 (20:15 -0400)]
tests: Rename testheaderbar2 to testheaderbar
There is only one headerbar test now.
Matthias Clasen [Fri, 15 May 2020 00:01:45 +0000 (20:01 -0400)]
tests: Consolidate all headerbar tests
No need to have several binaries for this.
See #2738
Matthias Clasen [Thu, 14 May 2020 23:48:08 +0000 (19:48 -0400)]
tests: Drop testorientable
Not really that interesting, and it only
tests a single case of orientable, a box.
See #2738
Matthias Clasen [Thu, 14 May 2020 23:44:54 +0000 (19:44 -0400)]
tests: Drop testemblems
We no longer support emblems on icons.
See #2738
Matthias Clasen [Thu, 14 May 2020 23:43:01 +0000 (19:43 -0400)]
tests: Drop testgiconpixbuf
More a pixbuf test, and we don't support
emblems anymore.
See #2738
Matthias Clasen [Thu, 14 May 2020 23:15:06 +0000 (19:15 -0400)]
tests: Drop testbuttons
This does not really add much. We have plenty
of different button styles in our demos and
tests.
See #2738
Matthias Clasen [Thu, 14 May 2020 22:40:54 +0000 (22:40 +0000)]
Merge branch 'wip/exalm/kinetic_scrolling' into 'master'
eventcontrollerscroll: Fix the history push condition
See merge request GNOME/gtk!1902
Alexander Mikhaylenko [Thu, 14 May 2020 20:20:38 +0000 (01:20 +0500)]
eventcontrollerscroll: Fix the history push condition
Once upon a time, there was a function called gdk_event_get_scroll_deltas().
It returned %TRUE when an event had scroll deltas and that was used as the
condition to decide whether to push scroll deltas to the scroll history,
even when the both deltas are 0 for the stop event at the end of scrolling.
When GtkScrolledWindow kinetic scrolling code was adapted for
GtkEventControllerScroll, it was replaced with a (dx != 0 && dy != 0)
check. This prevented the stop event from getting into the history, and
instead allowed non-smooth scrolling to affect the history as they have
synthetic deltas with one of the values being -1 or 1 and the other on 0.
Instead, check the direction as we already have it as a local variable.
Jakub Steiner [Thu, 14 May 2020 17:35:10 +0000 (17:35 +0000)]
Merge branch 'wip/jimmac/focus-tabs' into 'master'
Adwaita: don't focus outline tabs with mouse
Closes #2721
See merge request GNOME/gtk!1901
Jakub Steiner [Thu, 14 May 2020 16:50:47 +0000 (18:50 +0200)]
Adwaita: don't focus outline tabs with mouse
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2721
Matthias Clasen [Thu, 14 May 2020 15:37:16 +0000 (15:37 +0000)]
Merge branch 'wip/exalm/headerbar-migration' into 'master'
docs: Mention GtkHeaderBar title and subtitle changes in migration guide
See merge request GNOME/gtk!1900
Alexander Mikhaylenko [Thu, 14 May 2020 13:53:09 +0000 (18:53 +0500)]
docs: Mention GtkHeaderBar title and subtitle changes in migration guide
Matthias Clasen [Thu, 14 May 2020 13:10:54 +0000 (13:10 +0000)]
Merge branch 'x11-dnd-fix' into 'master'
Fix dnd on X11
See merge request GNOME/gtk!1899
Alexander Larsson [Thu, 14 May 2020 12:33:57 +0000 (14:33 +0200)]
GdkX11DragSurface: set visible state and invalidate on present
Without this we won't actually draw the surface.
Daniel Mustieles [Thu, 14 May 2020 10:04:27 +0000 (12:04 +0200)]
Updated Spanish translation
Daniel Mustieles [Thu, 14 May 2020 10:00:33 +0000 (12:00 +0200)]
Updated Spanish translation
Alexander Larsson [Thu, 14 May 2020 09:46:33 +0000 (11:46 +0200)]
X11 dnd: Calculate relative coords right in events
GdkSurface.x/y is mostly 0, we need to look atht GdkX11Surface->abs_x/y.
Alexander Larsson [Thu, 14 May 2020 08:45:38 +0000 (10:45 +0200)]
gtk-demo/dnd: Fix up drag_cancel
This needs to return a boolean, also it should not call end because
that will be called anyway by Gtk+ after cancel, and this was causing
warnings due to the opacity being unset with no dragged widget set.
Alexander Larsson [Thu, 14 May 2020 08:44:07 +0000 (10:44 +0200)]
GtkDragSource: Pass return value of drag-cancel into drag_end()
This is needed to work as the docs say (don't play fallback cancel animation
if cancel returned TRUE to signal the drop already happened).
Alexander Larsson [Thu, 14 May 2020 08:13:05 +0000 (10:13 +0200)]
gtk-demo/dnd: Use gtk_popover_set_child(), not gtk_box_append
Alexander Larsson [Thu, 14 May 2020 07:42:53 +0000 (09:42 +0200)]
x11 drag: Fix mapped error
In the gtk-demo drag-and-drop demo i can't drag anything, all I get
is:
(gtk4-demo:358993): Gdk-CRITICAL **: 09:36:19.617: Surface 0x7e1bb0 has not been mapped in GdkSeatGrabPrepareFunc
This is because GdkX11Drag.ipc_surface is not considered mapped, even
though we called gdk_x11_surface_show() on it, because the
GDK_SURFACE_STATE_WITHDRAWN flag is still set.
I added calls to gdk_synthesize_surface_state() to match what
e.g. show_popup() and gdk_x11_toplevel_present() does.
Matthias Clasen [Thu, 14 May 2020 05:47:26 +0000 (05:47 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1897
Matthias Clasen [Thu, 14 May 2020 05:16:56 +0000 (01:16 -0400)]
gtk-demo: Fix a problem with the dnd demo
When I move this into gtk-demo, I broke the hack
that ensures the GtkColorSwatch type is registered.
Bring it back.
Matthias Clasen [Thu, 14 May 2020 03:25:58 +0000 (23:25 -0400)]
widget-factory: Ensure we have some backgrounds
The flowbox demo is otherwise less than useful,
if /usr/share/gnome/backgrounds isn't present.
At the same time, give the scale in the listbox
some function.
Matthias Clasen [Thu, 14 May 2020 03:28:08 +0000 (03:28 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1896
Matthias Clasen [Thu, 14 May 2020 00:14:43 +0000 (20:14 -0400)]
Add a test for a flowbox crash
Matthias Clasen [Thu, 14 May 2020 00:33:25 +0000 (20:33 -0400)]
flowbox: Avoid an assertion in snapshot()
The api contract for size_allocate() vfuncs is
that they must allocate all the children that are
going to be snapshotted in snapshot(). The flowbox
size_allocate() was just bailing out when the children
request a size of 0x0, leading to an assertion in
snapshot() vfunc later. Just allocate all children
a size of 0x0 in this case.
Matthias Clasen [Thu, 14 May 2020 00:32:30 +0000 (20:32 -0400)]
flowbox: Avoid a crash in measure()
When the children request a height of zero, the
flowbox measure() function was happily dividing
by that zero, leading to badness.
Matthias Clasen [Thu, 14 May 2020 01:45:25 +0000 (21:45 -0400)]
listbox: Make Shift-Tab work again
The previous fix broke the case where we're Shift-Tabbing
from a listboxrow child to the row itself. This was causing
the widget-factory2.tab-backward test to fail. Fix it, by
grabbing the focus to the row explicitly.
Matthias Clasen [Wed, 13 May 2020 23:43:04 +0000 (19:43 -0400)]
listbox: Don't steal focus-on-click
If a row has content that is focus-on-click, and is set
to focus-on-click itself, then the row steals the focus
fromt he content, since it uses focus-on-click on button
release, as opposed to button press. Avoid that by
refusing to take focus if it is already on some
descendent of the row.
This was showing up in the widget-factory listbox on
page 2, where clicking on the spinbutton would briefly
put the focus on the spinbutton, only to lose it to
the row.
Matthias Clasen [Wed, 13 May 2020 23:21:50 +0000 (19:21 -0400)]
widget-factory: Cosmetic changes
Change which rows in the listbox on page 2 are activatable,
and trigger a dialog. It did not really make sense that this
would happen when clicking on the spin button to focus it.
Matthias Clasen [Wed, 13 May 2020 23:21:00 +0000 (19:21 -0400)]
gtk-demo: Don't overdraw the fishbowl
Set overflow to hidden for the fishbowl widget, so the
blur buttons don't leak out into the window shadow.
Matthias Clasen [Wed, 13 May 2020 22:56:25 +0000 (18:56 -0400)]
inspector: Disable recursive inspection
We can't inspect the inspector, it doesn't work.
Therefore, disable the keybindings in the
inspector window.
Matthias Clasen [Wed, 13 May 2020 22:27:18 +0000 (18:27 -0400)]
flowbox: Make the children focusable again
This broke when the :focusable property was introduced.
The symptom was that keynav in the Emoji chooser did
not work anymore.
Matthias Clasen [Wed, 13 May 2020 22:19:55 +0000 (22:19 +0000)]
Merge branch 'tests-cleanup' into 'master'
Tests cleanup
See merge request GNOME/gtk!1894
Matthias Clasen [Wed, 13 May 2020 21:57:15 +0000 (21:57 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1895
Matthias Clasen [Wed, 13 May 2020 21:24:57 +0000 (17:24 -0400)]
gtk-demo: Plug a memory leak
This leak was there all along. But with the new
gtk_window_destroy(), it shows up as an unclosable
window. Very noticable.
Matthias Clasen [Wed, 13 May 2020 21:10:36 +0000 (17:10 -0400)]
scrolledwindow: Fix swapping out child
This was not working in the case that the existing child
is not a scrollable. It showed up as crashes of the
scrolling benchmark in gtk4-demo when switching examples.
Matthias Clasen [Wed, 13 May 2020 21:10:00 +0000 (17:10 -0400)]
tests: Fix scrolling performance test
Maybe this should be added to the benchmarks section
in gtk-demo. For now, fix it to work again.
Matthias Clasen [Wed, 13 May 2020 20:35:28 +0000 (16:35 -0400)]
tests: Drop testnoscreen
It tests something that no longer works, and that
we probably don't want to guarantee anyway.
See #2738
Matthias Clasen [Wed, 13 May 2020 20:23:48 +0000 (16:23 -0400)]
tests: Drop testexpander
This was copied into gtk4-demo at some point.
See #2738
Matthias Clasen [Wed, 13 May 2020 20:18:50 +0000 (16:18 -0400)]
tests: Drop testfontchooser
This test adds nothing over the font choosers in
our various demos.
See #2738
Matthias Clasen [Wed, 13 May 2020 20:15:09 +0000 (16:15 -0400)]
tests: Drop testcolorchooser
We have plenty of color choosers in demos.
This test doesn't add anything.
See #2738
Matthias Clasen [Wed, 13 May 2020 20:06:51 +0000 (20:06 +0000)]
Merge branch 'usable-scales' into 'master'
Usable scales
See merge request GNOME/gtk!1893
Matthias Clasen [Wed, 13 May 2020 19:57:03 +0000 (15:57 -0400)]
tests: Drop testbox
Not useful enough to keep.
See #2738
Matthias Clasen [Wed, 13 May 2020 19:52:00 +0000 (15:52 -0400)]
tests: Drop testcolorchooser2
This tests an embedded colorchooser. Just like we have in
widget-factory. And it doesn't work in !srcdir builds, so
it can go.
See: #2738
Matthias Clasen [Wed, 13 May 2020 19:42:25 +0000 (15:42 -0400)]
tests: Drop testicontheme
This is a command line utility for GtkIconTheme
that is probably not as useful as gtk4-icon-browser.
See: #2738
Matthias Clasen [Wed, 13 May 2020 19:40:39 +0000 (15:40 -0400)]
tests: Drop testpixbuf-scale
This looks like a GdkPixbuf utility, and we
are moving away from GdkPixbuf anyway.
See: #2738
Matthias Clasen [Wed, 13 May 2020 19:37:21 +0000 (15:37 -0400)]
tests: Drop testtoolbar2
This is just a tool bar styling test; we have
the same in the widget factory.
See: #2738
Matthias Clasen [Wed, 13 May 2020 19:23:23 +0000 (15:23 -0400)]
scale: Make the area around the trough clickable
The narrow trough is too hard to hit as a click target.
Make the entire scale clickable.
Matthias Clasen [Wed, 13 May 2020 18:31:39 +0000 (18:31 +0000)]
Merge branch 'wip/exalm/ocd' into 'master'
demo: Remove double borders from the treeview
See merge request GNOME/gtk!1892
Matthias Clasen [Wed, 13 May 2020 17:18:45 +0000 (17:18 +0000)]
Merge branch 'wip/jimmac/menu-styling-adjustments' into 'master'
Wip/jimmac/menu styling adjustments
See merge request GNOME/gtk!1891
Jakub Steiner [Wed, 13 May 2020 17:18:45 +0000 (17:18 +0000)]
Adwaita: use thinner arrows for navigation
- go-next go-previous instead of pan-end pan-start
See https://gitlab.gnome.org/GNOME/gtk/-/issues/2675
Alexander Mikhaylenko [Wed, 13 May 2020 15:57:00 +0000 (20:57 +0500)]
demo: Remove double borders from the treeview
sicklylife [Wed, 13 May 2020 15:16:19 +0000 (15:16 +0000)]
Update Japanese translation
sicklylife [Wed, 13 May 2020 15:12:03 +0000 (15:12 +0000)]
Update Japanese translation
Matthias Clasen [Wed, 13 May 2020 12:11:41 +0000 (08:11 -0400)]
Cosmetics
Matthias Clasen [Wed, 13 May 2020 12:08:29 +0000 (12:08 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master
Closes #2740, #2742, and #2741
See merge request GNOME/gtk!1890
Matthias Clasen [Wed, 13 May 2020 11:44:11 +0000 (11:44 +0000)]
Merge branch 'gtk-demo-expander-fix' into 'master'
gtk-demo: Fix expander demo
See merge request GNOME/gtk!1889
Matthias Clasen [Wed, 13 May 2020 11:42:00 +0000 (11:42 +0000)]
Merge branch 'print-editor-new-crash' into 'master'
print-editor: Fix crash
See merge request GNOME/gtk!1888
Timm Bäder [Wed, 13 May 2020 09:34:33 +0000 (11:34 +0200)]
window: Restructure gtk_window_destroy()
The previous code was unreffing the window twice, which caused problems
during dialog destruction. Move to g_list_store_find instead of
iterating manually.
ref() the window before and unref() after. g_list_store_remove will
actually unref() the window, since the toplevel_list owns its own
reference.
Fixes #2741
Fixes #2742
Timm Bäder [Fri, 8 May 2020 08:32:57 +0000 (10:32 +0200)]
main: Inline propagate_{down,up} in propagate_internal()
Don't have to worry about anyone calling the up/down variants on their
own this way.
Timm Bäder [Wed, 13 May 2020 07:21:01 +0000 (09:21 +0200)]
window: Create constraint solver on demand
Timm Bäder [Sat, 2 May 2020 05:50:57 +0000 (07:50 +0200)]
widget: Make 1 if out of 2 ifs
Alexander Larsson [Wed, 13 May 2020 09:04:49 +0000 (11:04 +0200)]
gtk-demo: InfoBar is not a GtkBox anymore
Use gtk_info_bar_add_child to add children
Alexander Larsson [Wed, 13 May 2020 08:50:41 +0000 (10:50 +0200)]
gtk-demo: Fix expander demo
GtkExpander is not a GtkBox anymore, so use the new gtk_expander_set_child()
API.
Alexander Larsson [Wed, 13 May 2020 08:18:17 +0000 (10:18 +0200)]
print-editor: Fix crash
We're trying to g_free a GFile, which is not good...
Timm Bäder [Wed, 13 May 2020 07:42:51 +0000 (09:42 +0200)]
paned: Fix up the docs once more
Timm Bäder [Wed, 13 May 2020 06:06:51 +0000 (08:06 +0200)]
cssvalue: Add class check to transition
In
b25f93e24c78c639b4fd869d4e42ba9161781c12 we removed the code
comparing the transition functions, but we didn't add any other check
back.
Fixes #2740
Timm Bäder [Tue, 12 May 2020 18:11:13 +0000 (20:11 +0200)]
gl renderer: Fix nested rounded clip rendering
If the inner clip intersects with the corners of the outer clip, we
potentially need a texture. We should add more fine-grained checks for
this in the future though.
Test case included.
Timm Bäder [Tue, 12 May 2020 18:09:22 +0000 (20:09 +0200)]
node-editor: Monitor file and reload on changes
Timm Bäder [Sun, 10 May 2020 14:55:03 +0000 (16:55 +0200)]
widget: Move adjusted size calculation below early-out goto
Timm Bäder [Sun, 10 May 2020 14:54:49 +0000 (16:54 +0200)]
widget: Remove size allocate signal enum member
Timm Bäder [Sun, 10 May 2020 08:02:20 +0000 (10:02 +0200)]
renderboder: Ignore transparent outlines
Matthias Clasen [Wed, 13 May 2020 02:10:20 +0000 (02:10 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
x11: Avoid a critical in clipboard data transfer
Closes #2736
See merge request GNOME/gtk!1887
Matthias Clasen [Wed, 13 May 2020 01:29:15 +0000 (21:29 -0400)]
x11: Avoid a critical in clipboard data transfer
The handler we are calling here asserts that it gets
an interned string as mime_type. So give it one.
Fixes: #2736
Matthias Clasen [Tue, 12 May 2020 21:18:03 +0000 (21:18 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1885
Matthias Clasen [Tue, 12 May 2020 21:17:29 +0000 (21:17 +0000)]
Merge branch 'tests-cleanup' into 'master'
Tests cleanup
See merge request GNOME/gtk!1884
Matthias Clasen [Tue, 12 May 2020 20:26:28 +0000 (16:26 -0400)]
paned: Don't ignore the type attribute
We were meaning to only handle <child> here for
compatibility, not <child type="somethingelse">.
Matthias Clasen [Tue, 12 May 2020 20:25:58 +0000 (16:25 -0400)]
paned: Drop the Private struct
Matthias Clasen [Tue, 12 May 2020 19:56:46 +0000 (15:56 -0400)]
tests: Drop the visuals test
This was just a different way to load a ui file
and try it with dark mode. This can be done
with gtk-builder-tool preview and GTK_THEME.
Matthias Clasen [Tue, 12 May 2020 19:42:37 +0000 (15:42 -0400)]
tests: Move testcairo into gtk4-demo
Replace the boring checkboard pattern with this
exciting drawing, and save one test binary at the
same time!
Matthias Clasen [Tue, 12 May 2020 19:29:55 +0000 (15:29 -0400)]
Drop the gtkgears test
This has recently been moved to gtk4-demo.
No need to duplicate it.
Matthias Clasen [Tue, 12 May 2020 19:28:34 +0000 (15:28 -0400)]
Move print-editor to demos
It is too demo-esque for languishing in tests/.
Matthias Clasen [Tue, 12 May 2020 19:12:17 +0000 (15:12 -0400)]
NEWS: Updates
Matthias Clasen [Tue, 12 May 2020 18:54:59 +0000 (18:54 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
printoperation-unix: Fix a use-after-free
See merge request GNOME/gtk!1883
Emmanuele Bassi [Tue, 12 May 2020 18:40:34 +0000 (18:40 +0000)]
Merge branch 'docs-fixes' into 'master'
Docs fixes
See merge request GNOME/gtk!1882
Matthias Clasen [Tue, 12 May 2020 18:09:51 +0000 (14:09 -0400)]
printoperation-unix: Fix a use-after-free
It turns out that finish_print destroys the
PrintResponseData, so we can't access it afterwards.
Emmanuele Bassi [Tue, 12 May 2020 17:52:45 +0000 (18:52 +0100)]
docs: Add annotations for GtkPaned new getters
Which means also adding gtk-doc stanzas.
Emmanuele Bassi [Tue, 12 May 2020 17:44:21 +0000 (18:44 +0100)]
docs: Remove unnecessary SECTION
The GdkDragSurface definitions fall under the "dnd" section.
Emmanuele Bassi [Tue, 12 May 2020 17:43:56 +0000 (18:43 +0100)]
docs: Remove redundant SECTION
We already have a SECTION stanza for gtk-doc.
Carlos Garnacho [Tue, 12 May 2020 16:14:47 +0000 (16:14 +0000)]
Merge branch 'wip/carlosg/broken-grabs' into 'master'
Fixes to broken grabs
Closes #2665
See merge request GNOME/gtk!1879